This invention relates to data processing systems and is particularly concerned with data processing systems involving transaction processing and database management.
Support for transaction processing requires the ability to ensure that the effects of data updates associated with a transaction are atomic; that is either all updates are applied or none. This atomicity must be achieved irrespective of failure during the transaction. This capability is often achieved by writing the updates associated with the transaction to a separate log file before they are applied to the database. Only if all of the updates to be applied are secured in the log file is the transaction completed by the data manager applying the updates to the database. Once all of the updates have been applied the transaction must be marked as complete in the log file.
Where a transaction involves more than one such data manager the data managers defer to a separate coordinator to control the progress of the transaction. As before each data manager writes its updates to a log file instead of updating the database. When the user work for the transaction ends the coordinator requests that each data manager puts itself in a state where it is prepared to commit or rollback the transaction (by writing to its own log). When all of the involved data managers have reached this state the coordinator secures the decision to commit the transaction in its own log and tells each data manager to commit any changes. Before replying that it has completed, each data manager records in its own log that it has completed. When all data managers have completed the coordinator records the completion of the transaction in its own log. Each transaction therefore involves 2+2n log writes (where n is the number of data managers involved in the transaction).
The object of the present invention is to provide an improved data processing system in which the number of writes to such log files is reduced.